home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
-
- Author: Yevgen Muntyan <muntyan@tamu.edu>
- Copyright (C) 2008 Yevgen Muntyan
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-
- -->
- <language id="nsis" _name="NSIS" version="2.0" _section="Others">
- <metadata>
- <property name="globs">*.nsi;*.nsh</property>
- <property name="line-comment-start">;</property>
- </metadata>
-
- <styles>
- <style id="operator" _name="Operator" map-to="def:operator"/>
- <style id="comment" _name="Comment" map-to="def:comment"/>
- <style id="string" _name="String" map-to="def:string"/>
- <style id="variable" _name="Variable" map-to="makefile:variable"/>
- </styles>
-
- <definitions>
-
- <context id="operator" style-ref="operator">
- <prefix>!</prefix>
- <keyword>define</keyword>
- <keyword>include</keyword>
- <keyword>insertmacro</keyword>
- <keyword>ifdef</keyword>
- <keyword>endif</keyword>
- </context>
-
- <define-regex id="identifier">[\w_][\w\d_]*</define-regex>
-
- <context id="variable" style-ref="variable">
- <match>\$(\%{identifier}|\{\%{identifier}\}|\(\^\%{identifier}\))</match>
- </context>
-
- <context id="variable-assignment">
- <match>^\s*(!define)\s+(\%{identifier})</match>
- <include>
- <context sub-pattern="1" style-ref="operator"/>
- <context sub-pattern="2" style-ref="variable"/>
- </include>
- </context>
-
- <context id="string" style-ref="string">
- <start>"</start>
- <end>"</end>
- <include>
- <context ref="variable"/>
- </include>
- </context>
-
- <context id="comment" style-ref="comment" end-at-line-end="true">
- <start>;</start>
- <include>
- <context ref="def:in-comment"/>
- </include>
- </context>
-
- <context id="nsis">
- <include>
- <context ref="operator"/>
- <context ref="variable"/>
- <context ref="variable-assignment"/>
- <context ref="comment"/>
- <context ref="string"/>
- </include>
- </context>
-
- </definitions>
- </language>
-